package com.googlecode.imanager.client.bridge;

/**
 * @author wellsantos@wellsantos.com
 * @since 0.01
 */
public enum BridgeType {
    EMPTY   (false),
    SWING   (true),
    HTML    (true),
    PDF     (false),
    XLS     (false);
    
    private static final BridgeType[] values = values();
    
    private final boolean runnable;
    
    private BridgeType(boolean runnable) {
        this.runnable = runnable;
    }

    public boolean isRunnable() {
        return runnable;
    }
    
    public boolean isReport() {
        return !runnable;
    }
    
    public long getId(){
        return 1 << this.ordinal();
    }

    public static BridgeType valueOf(int i) {
        return values[i];
    }
    
    public static int count(){
        return values.length;
    }

}
